<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>">
		<!--[if lte IE 6]></base><![endif]-->
		<title>广东科学技术职业学院考生报到系统>>>>财务处</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">

		<link href="css/newindex.css" rel="stylesheet" type="text/css" />
			<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="js/excanvas.min.js"></script><![endif]-->
		
		<script src="js/jquery-1.5.js" language="javascript">
</script>
		<script src="js/newpublic.js" language="javascript">
</script>
		<script src="js/jquery-ui-1.8.5.custom.min.js" language="javascript">
</script>
			<!-- 需要 -->
		<script language="javascript" type="text/javascript"
			src="js/excanvas.min.js">
</script>
		<script language="javascript" type="text/javascript"
			src="js/jquery.flot.js">
</script>
	
		<!-- 下面是饼图所要用到的两个文件 -->
		<script type="text/javascript" src="js/jquery.flot.pie.min.js">
</script>
		<script type="text/javascript" src="js/Pie-chart.js">
</script>
	


<script>
var registerBarchart = new PieChart();
var paymentBarchart = new PieChart();
var t;
$(function() {
	$("#content").draggable({cancel:".contable"});
	//默认执行
	updataPayment()
	var areaJson =<s:property value="areaJson" escape="false"/>	
	var campusJson = <s:property value="campusJson" escape="false"/>	
	initSelect(campusJson,areaJson)//初始化校区，地区，科目
})
	var t;
	//更新
	function updataPayment(){
		$.post("json/queryLeaderToSchoolPaymentAction",{'campusName':$('#campusName').val(),'area':$('#areaName').val(),'subjects':"" ,date:new Date()},function(data){
						
						data=eval("("+data.paymentResult+")");
						fillFaymentResult(data);
		})
		
		window.clearTimeout(t);
		t=window.setTimeout(function(){updataPayment()},30000)	
				
	}
	
	//初始化下拉列表
	function initSelect(campusJson,areaJson)
		{
			if(campusJson!=null){
				$("#campusName").empty();
				$("#campusName").append("<option value=''>全部</option>");
				for(campus in campusJson){
					$("#campusName").append("<option value='"+campus+"'>"+campusJson[campus]+"</option>");
				}
			}
		
			if(areaJson!=null){
				$("#areaName").empty();
				$("#areaName").append("<option value=''>全省</option>");
				for(area in areaJson){
					$("#areaName").append("<option value='"+area+"'>"+areaJson[area]+"</option>");
				}
			}
		}
		
		//填充缴费结果
		function fillFaymentResult(data){
			//alert(data);
			$("#totalAmount").html(data.totalAmount);
			$("#paymentDue").html(data.paymentDue);
			$("#feesPaid").html(data.feesPaid);
			$("#delinquentAmounts").html(data.delinquentAmounts);
			$("#feesPaidCounts").html(data.feesPaidCounts);
			paymentBarchart.buildPieChart($("#placeholderForBars"),{'未缴费' : (1 - data.registerRate),'已缴费' :data.registerRate},null);
		}

</script>


	</head>

	<body onload="fixPNGAll()">
		<div id="bg">
			<div id="bodydiv">
				<div id="bodytitle"> 
					财务处 
					<div>
						<a href="logoutAction" style="color: #F00;">退出</a>
					</div>
				</div>
				<div id="menudiv">
					<div class="menu">
						<div style="position: relative;">
							<a href="financeAction"><img src="newimages/l3.png"
									width="48" height="48" border="0" />
								<div>
									学校缴费率
								</div> </a>
						</div>
					</div>
					<div class="menu">
						<div style="position: relative;">
							<a href="financeCollegeAction"><img src="newimages/l1.png"
									width="46" height="47" border="0" />
								<div>
									学院缴费率
								</div> </a>
						</div>
					</div>
					<div class="menu">
						<div style="position: relative;">
							<a href="financeProfessionAction"><img src="newimages/l2.png"
									width="48" height="48" border="0" />
								<div>
									专业缴费率
								</div> </a>
						</div>
					</div>
					<div class="menu">
						<div style="position: relative;">
							<a href="financeStudentAction"><img src="newimages/class.png"
									width="48" height="48" border="0" style="margin-top:5px;" />
								<div style="margin-top:-10px;">
									 学生缴费信息
								</div> </a>
						</div>
					</div>
				</div>
				<div id="content">
					<!--当前位置CSS-->
					<div class="top">
						<div class="topleft">
							<div class="dan">
								<div>
									当前位置>财务处>学校报到率
								</div>
							</div>
							<div class="F5">
								<img src="newimages/F5.png" />
							</div>
						</div>
						<div class="topright">
							<div class="toprightmin"></div>
							<div class="toprightmax"></div>
							<div class="toprightclose" onclick="if(confirm('是否确定退出！')){location.replace('loginoutAction')}" title="点击退出"></div>
						</div>
					</div>
					<!---->
					<!--内容-->
					<div class="condiv">
						<div class="submenu">

						</div>
						<div class="contable">
							<!--******************************-->
							<div id="t1" style="display: block;">
								<div class="title">
									学校概况
								</div>
<!--								-->
<!--								<table width="80%" border="0" align="center" cellpadding="1" cellspacing="5">-->
<!--										<tr><td width="85%"></td></tr>-->
<!--										<tr>-->
<!--										<td width="15%" align="right">-->
<!--												<input name="" type="button" value="刷新" onclick="updataPayment()" />-->
<!--										</td>-->
<!--										</tr>-->
<!--									</table>-->
								
								
								<table width="70%" border="0" align="center" cellpadding="1"
									cellspacing="0" id="t9">
									<tr>
										<td colspan="4">

											<table width="100%" border="0" align="center" cellpadding="1"
												cellspacing="8">
												<tr>
													<td width="23%" align="right">
														校区：
													</td>
													<td width="26%" align="left">
														<select id="campusName" >
															<option>
																全部
															</option>
															
														</select>
													</td>
													<td width="13%" align="right">
														地区：
													</td>
													<td width="38%" align="left">
														<select id="areaName">
															<option>
																全省
															</option>
														</select>
													</td>
													<td>
														<input name="" type="button" value="确定" onclick="updataPayment()" />
													</td>
												</tr>
											</table>


										</td>
									</tr>
									<tr>
										<td colspan="2" align="left" valign="middle">
											<table width="108%" cellspacing="8"
												style="letter-spacing: 2px;">
												<tr>
													<td align="right" style="display:none;">
														总缴费金额：
													</td>
													<td align="left" style="display:none;">
														<h2 id="totalAmount" style="margin-top:auto; margin-bottom: auto">0.0</h2>
													</td>
												</tr>
												<tr>
													<td height="44" align="right">
														应收缴费总额：
													</td>
													<td align="left" style="color: #0C0;">
														<h2 id="paymentDue" style="margin-top:auto; margin-bottom: auto">0.0</h2>
													</td>
												</tr>
												<tr>
													<td height="43" align="right">
														已缴费金额：
													</td>
													<td align="left" style="color: #F00;">
														<h2 id="feesPaid" style="margin-top:auto; margin-bottom: auto">0.0</h2>
													</td>
												</tr>
												<tr>
													<td align="right">
														欠费金额：
													</td>
													<td align="left">
														<h2 id="delinquentAmounts" style="margin-top:auto; margin-bottom: auto">0.0</h2>
													</td>
												</tr>
												<tr>
													<td align="right">
														已缴费人数：
													</td>
													<td>
														<h2 id="feesPaidCounts" style="margin-top:auto; margin-bottom: auto">0.0</h2>
													</td>
												</tr>
												<tr>
													<td align="right" colspan="2"
														style="font-size: 16px; color: #F00; padding-right: 20px;">
														单位：万元
													</td>
												</tr>
											</table>
										</td>
										<td width="50%" align="left">
											<div style="width: 90%">
												<div id="placeholderForBars" style="width: 380px; height: 350px; float: left;"></div>
												<div align="center" >已缴费率 ≈ ( <font style="color: #F00;">已缴费金额</font> / <font style="color: #0C0;">应收缴费总额</font> ) * 100%<br /></div>
											</div>
										</td>
									</tr>

								</table>
							</div>
							<!-------**********************************-------->
							<!----------------------------------------------->
						</div>


					</div>
					<!---->
					<!---->
					<div class="condiv"
						style="width: 997px; position: relative; height: 20px; min-height: 20px; text-align: center;">
						<a href="computer/computer.html" target="_blank">计算机学院程序员之家</a>
					</div>
					<!---->

					<!--低部-->
					<div class="bottom">
						&nbsp;
					</div>
					<!---->
				</div>
			</div>
		</div>
	</body>
</html>
